import { createRouter, createWebHistory } from 'vue-router'
import My from '@/views/home/my.vue'
import Cart from '@/views/home/cart.vue'
import Cla from '@/views/home/cla..vue'
import Index from '@/views/home/index.vue'
import Home from '@/views/home/home.vue'
import retil from "@/views/retil/index.vue";
import login from "@/views/login/index.vue";
const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/home',
      name: 'home',
      component: Home, children: [
        {
          path: 'index',
          name: 'index',
          component: Index,
        },
        {
          path: 'cla',
          name: 'cla',
          component: Cla,
        },
        {
          path: 'cart',
          name: 'cart',
          component: Cart,
        },
        {
          path: 'my',
          name: 'my',
          component: My,
        },
      ]
    },
    {
      path: '/retil',
      name: 'retil',
      component: retil,
    },
        {
      path: '/login',
      name: 'login',
      component: login,
    },
  ],
})

export default router
